import service from '@/utils/request';

export const getlistApp = (pageSize = 5, pageIndex = 1) => {
    return service({
        url: '/app/getAppInfoList',
        method: 'get',
        params: {
            pageSize,
            pageIndex
        },
    });
};



export const addApp = (data) => {
    return service({
        url: '/app/addAppInfo',
        method: 'post',
        data:data
    });
}

export const updateApp = (data) => {
    return service({
        url: '/app/updateAppInfo',
        method: 'put',
        data:data
    });
}

export const deleteApp = (data) => {
    return service({
      url: '/app/deleteAppInfo',
      method: 'delete',
      data:data
    })
  }

export const getListAppAllowServiceItem = (pageIndex,pageSize,appId) => {
    return service({
        url: '/app/ListAppAllowServiceItem',
        method: 'get',
        params: { pageIndex,pageSize,appId: appId } ,
    })
}

export const RegisAppAllowService = (data) => {
    return service({
        url: '/app/RegisAppAllowService',
        method: 'post',
        data:data
    });
}

export const getListAppDataLog = (pageIndex,pageSize,ServiceId) => {
    return service({
        url: '/app/ListAppDataLog',
        method: 'get',
        params: { pageIndex,pageSize,ServiceId: ServiceId } ,
    })
}